<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div style="font-size: 10px;" onclick="changeSize()">哈哈哈</div>
</body>
<script>
    function changeSize() {
        let element = document.querySelector('div')
        console.log(element.style)
        let size = parseInt(element.style.fontSize) + 10
        // element.style.fontSize = size + "px"
        element.style.cssText = "font-size:" + size + "px"
        // console.log(typeof(size))
    }
</script>
</html>